<?php
// src/Erp/UserBundle/Entity/User.php

namespace Erp\UserBundle\Entity;

use Erp\ErpBundle\Entity;
use FOS\UserBundle\Entity\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="erp_user")
 */
class User extends BaseUser
{	
	/**
	 * @ORM\OneToMany(targetEntity="Erp\ErpBundle\Entity\Participer_Evenement", mappedBy="user")
	 *
	 */
	protected $participer;
	
	/**
	 * @ORM\OneToMany(targetEntity="Erp\ErpBundle\Entity\Evenement", mappedBy="userevent")
	 *
	 */
	protected $evenement;
	
	/**
	 * @ORM\OneToMany(targetEntity="Erp\PollBundle\Entity\Questionpoll", mappedBy="userpoll")
	 *
	 */
	protected $poll;
	
	/**
	 * @ORM\OneToMany(targetEntity="Erp\ErpBundle\Entity\Cours", mappedBy="professeur")
	 */
	protected $cours_donnes;
	
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;
    
    /**
     * @var string $nom
     *
     * @ORM\Column(name="nom", type="string", length=255, nullable=true)
     */
    private $nom;
    
    /**
     * @var string $prenom
     *
     * @ORM\Column(name="prenom", type="string", length=255, nullable=true)
     */
    private $prenom;
    
    /**
     * @var string $tel
     *
     * @ORM\Column(name="tel", type="string", length=20, nullable=true)
     */
    private $tel;
    
    /**
     * Set nom
     *
     * @param string $nom
     */
    public function setNom($nom)
    {
    	$this->nom = $nom;
    }
    
    /**
     * Get nom
     *
     * @return string
     */
    public function getNom()
    {
    	return $this->nom;
    }
    
    /**
     * Set prenom
     *
     * @param string $prenom
     */
    public function setPrenom($prenom)
    {
    	$this->prenom = $prenom;
    }
    
    /**
     * Get prenom
     *
     * @return string
     */
    public function getPrenom()
    {
    	return $this->prenom;
    }
    
    /**
     * Set tel
     *
     * @param string $tel
     */
    public function setTel($tel)
    {
    	$this->tel = $tel;
    }
    
    /**
     * Get tel
     *
     * @return string
     */
    public function getTel()
    {
    	return $this->tel;
    }

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }
	
	public function getCoursDonnes()
	{
		return $this->cours_donnes;
	}
	
	public function addCours(\Erp\ErpBundle\Entity\Cours $cours)
	{
		$this->cours_donnes[] = $cours;
		$cours->setProfesseur($this);
	}
}